import http from "../../utils/requestAI"; // 修正拼写错误
import { type ExampleGenerate, type Data } from "./type";
import { type addPrems } from "./type";

// 列表
export const getCompanys = (params?: Data) => {
  return http.get<ExampleGenerate>('/building/list', params);
}

// 删除
export const delCompany = (id: number) => {
  console.log('删除1111', id);
  return http.delete(`/building/delete/${id}`);
}

// 添加
export const addCompany = (data: addPrems) => {
  return http.post(`/building/add`, data);
}

// 修改
export const editCompany = (data: addPrems) => {
  return http.put(`/building/update`, data);
}